<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <script src="../src/throttle.js"></script>
  <title>防抖</title>
</head>
<body>
  <input type="text" id="inputDom" />
  <script>
      let dom = window.document.getElementById('inputDom')
      let doSomeThin = 'null'
      dom.addEventListener('keyup', throttle(doSomeThin, 2000, true), false)
      function doSomeThing() {
          let date = new Date()
          console.log(date.getSeconds())
      }
  </script>
</body>
</html>
